<template>
  <div class="el-wrapper flex">
    <h-aside />
    <!-- <h-main /> -->
    <section class="flex-1 flex flex-col">
      <h-header />
      <main class="w-full h-full">
        <div class="p-4">
          <router-view />
        </div>
      </main>
    </section>
  </div>
</template>

<script setup>
import { local } from '@/utils/storage'
const router = useRouter()
onMounted(() => {
  console.log('=== Layout router ===')
  if (!local.get('admin-token')) {
    router.push('/login')
  }
})
</script>

<style scoped>
button,
[type='button'],
[type='reset'],
[type='submit'] {
  background-color: var(--el-button--primary) !important;
}

::v-deep .el-dialog__body {
  border-top: 1px solid var(--el-border-color-light) !important;
  border-bottom: 1px solid var(--el-border-color-light) !important;
}

/* editor */
::v-deep .w-e-modal .babel-container {
  margin-bottom: 0;
}
::v-deep .babel-container:nth-child(3) {
  display: none;
}
::v-deep .w-e-modal .babel-container span {
  margin-bottom: 0;
}
::v-deep .w-e-modal input[type='text'] {
  padding: 0 8px;
}
::v-deep .w-e-modal .button-container {
  @apply flex justify-end;
}
::v-deep .w-e-modal button {
  margin-top: 0.5rem;
  padding: 0 1rem;
  height: 32px;
}
</style>
